﻿Public Class DMCha

    Private Sub DMCha_Load(sender As Object, e As EventArgs) Handles MyBase.Load
        'TODO: This line of code loads data into the 'PCV_TutorialDataSet.Con' table. You can move, or remove it, as needed.
        Me.ConTableAdapter.Fill(Me.PCV_TutorialDataSet.Con)
        'TODO: This line of code loads data into the 'PCV_TutorialDataSet.Cha' table. You can move, or remove it, as needed.
        Me.ChaTableAdapter.Fill(Me.PCV_TutorialDataSet.Cha)

    End Sub
    Public Sub New()
        InitializeComponent()
        Me.setSoTab(1)
        Me.setObj(Me.PCV_TutorialDataSet, PCV_TutorialDataSet.Cha, Me.ChaBindingSource, Me.TableAdapterManager, Me.ChaTableAdapter, MaITextEdit, GhichuITextEdit)
        Me.setTab1(PCV_TutorialDataSet.Con, Me.FKConConBindingSource, Me.ConTableAdapter)
    End Sub
    Public Overrides Sub setSubSau_TaoMoi()
        Me.Nhomdanhmuc_maITextEdit.EditValue = System.Guid.NewGuid

    End Sub

    Private Sub IGridViewChiTiet01_InitNewRow(sender As Object, e As DevExpress.XtraGrid.Views.Grid.InitNewRowEventArgs) Handles IGridViewChiTiet01.InitNewRow
        Me.IGridViewChiTiet01.SetFocusedRowCellValue("danhmuc_ma", System.Guid.NewGuid)
    End Sub

    Public Sub setMa(ByVal ma As String)
        Me.MaITextEdit.EditValue = ma
    End Sub

End Class
